# python3.6.5
# 需要引入requests包 ：运行终端->进入python/Scripts ->输入：pip install requests
import ddddocr

# from ShowapiRequest import ShowapiRequest
#
# r = ShowapiRequest("http://route.showapi.com/1274-2","940495","5b509b6e72054e2e8ebb9e36043435b0" )
# r.addBodyPara("imgUrl", "https://showapi.oss-cn-hangzhou.aliyuncs.com/site/apiCase/1274/20210709160926.png")
# r.addBodyPara("base64", "")
# res = r.post()
# print(res.text) # 返回信息

def yanzhengma():
    ocr = ddddocr.DdddOcr()
    with open(r'D:\Pycharm2021\Selenium_Project\testcases\01.png', 'rb') as f:
        img_bytes = f.read()
    res = ocr.classification(img_bytes)
    print(res)

yanzhengma()